From: Florian Müllner Date: Thu, 30 Aug 2012 16:14:24 +0000 (+0200) Subject: messageTray: Use monitor geometry for dwelling X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6013 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dc13e72b89bed4feddcfd0d6a5345f806136714f;p=gnome-shell.git messageTray: Use monitor geometry for dwelling In multi-monitor setups, the screen might extend below the edge of the monitor that holds the tray. In that case the tray is currently triggered from a secondary monitor, which is rather surprising; change the check to use the correct monitor geometry instead. https://bugzilla.gnome.org/show_bug.cgi?id=683044 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 52bb0e176..2d7ef8ea2 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1497,7 +1497,10 @@ const MessageTray = new Lang.Class({ }, _checkTrayDwell: function(x, y) { - if (y == global.screen_height - 1) { + let monitor = Main.layoutManager.bottomMonitor; + let shouldDwell = (x >= monitor.x && x <= monitor.x + monitor.width && + y == monitor.y + monitor.height - 1); + if (shouldDwell) { // We only set up dwell timeout when the user is not hovering over the tray // (!this.actor.hover). This avoids bringing up the message tray after the // user clicks on a notification with the pointer on the bottom pixel